<template>
  <div>
    <div class="header" id="header">
      <router-link to="/percen">
        <div class="header_back">
          <div class="header_back_r"></div>
        </div>
      </router-link>
      <div id="head-title">我已卖出的商品</div>
      <router-link to="/" class="gb-head-rightwrap" data-ajax="false">
        <div class="header_right">
          <img
            src=""
          />
        </div>
      </router-link>
    </div>
    <div class="module">
      <div class="check clearfix">
        <router-link
          :to="item.router + `/${index}/` + item.to"
          v-for="(item, index) in selllist"
          :key="index"
          :class="['check_title', m == index ? 'check_title_nowtitle' : '']"
          >{{ item.name }}</router-link
        >
      </div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      m: 0,
      n: "",
    };
  },
  computed: {
    selllist() {
      return this.$store.state.percen.selllist;
    },
    orderlist() {
      return this.$store.state.percen.orderlist;
    },
    alllist() {
      return this.$store.state.percen.alllist;
    },
  },
  created() {
    let { m, n } = this.$route.params;
    this.m = m;
    this.n = n;
  },
  beforeRouteUpdate(to, from, next) {
    let { m, n } = to.params;
    this.m = m;
    this.n = n;
    next();
  },
};
</script>

<style lang="less" scoped>
@import url("../../assets/css/commot.css");
.emptyStatus {
  height: 5.5rem;
  text-align: center;
  padding-top: 0.2rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  margin-left: 0.9rem;
}

.emptyStatus .img {
  width: 2rem;
  float: left;
  height: 200px;
  border-radius: 8px;
}
.emptyStatus p {
  color: #898989;
}
.module .check .check_title {
  font-size: 0.1rem;
  width: 14%;
}
</style>